/*
 SGBin.h
 Date Created: March 10, 2010
 
 Authors: Karanvir Gill <viper1029@gmail.com>
          Frank Lau <flaua@sfu.ca>
 
 Copyright (C) 2010 Green-Power
 
 URL: http://code.google.com/p/green-power
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 3 of the License, or
 (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
 $Id$
 */

#import <Foundation/Foundation.h>
#import "SGBinType.h"
#import "SGRecyclableItem.h"

/**
 * This class represents a bin used in the sorting game. Each bin is of a 
 * specific bin type. The array acceptsItems contains the unique names of 
 * recyclable items that are accepted by the bin.
 */
@interface SGBin : UIImageView {
	NSArray *acceptsItems;
}

@property(nonatomic,retain) NSArray *acceptsItems;

/**
 * Constructor used to initilize a bin based on the based on the bin type 
 * and x and y coordinates. 
 *
 * \param binType The type of bin to create
 *
 * \param xLocation The x coordinate of the bottom left of the item 
 *
 * \param yLocation The y coordinate of the bottom left of the item 
 *
 * \return A bin with the desired position and the correct image based on the 
 * type. The array accpetsItems contains the unique names of the items accepted 
 * by the bin
 */
- (SGBin*)initWithType:(SGBinType*)binType xLocation:(float)xCoor yLocation:(float)yCoor;

/**
 * Checks if a particular item is accepted by the bin. The comparison is made 
 * based on the uniqueName of the recyclable entered as a parameter and 
 * acceptsItems array.  
 *
 * \param item The items to be checked
 *
 * \return True if the items is accepted by the bin
 */
- (BOOL)itemAccepted:(SGRecyclableItem*)item;

@end
